home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / database / sch110a.arj / RELSTART.PRG < prev    next >
Text File  |  1993-10-31  |  7KB  |  209 lines

  1. *****
  2. * Real Estate demo system
  3. * Note: The palette may have changed since the last procedure. Be
  4. * aware that some of the color numbers may be different from other 
  5. * procedures. 
  6. *****
  7. *****
  8. * Open real estate file and jump to top
  9. *****
  10. if .not. is_open("property")
  11.     open("property","",.t.,"property")
  12. else
  13.     fselect("property")
  14. endif
  15. jumpto("top")
  16. *****
  17. * Set graphics and build screen
  18. *****
  19. graphmode(2)
  20. imgpcx("wl1vga16.pcx",0,0,"flash")
  21. graphcolor(1)
  22. graphbox("SOLID",5,5,634,35)
  23. imgsay(01,21,14,15,-1,"","SCHOONER Real Estate Brokerage Services")
  24. graphcolor(8)
  25. imgiconbox(05,30,634,66,15,7,8,"etched")
  26.  
  27. imgiconbox(09,34,73,62,15,7,8,"raised")
  28. imgsay(03,03,14,1,-1,"","FILE")
  29.  
  30. imgiconbox(75,34,139,62,15,7,8,"raised")
  31. imgsay(03,10,14,1,-1,"","OPTIONS")
  32.  
  33. imgiconbox(141,34,205,62,15,7,8,"raised")
  34. imgsay(03,19,14,1,-1,"","HELP?")
  35.  
  36. imgiconbox(250,34,314,62,15,7,8,"raised")
  37. imgsay(03,33,14,1,-1,""," <<  ")
  38.  
  39. imgiconbox(316,34,380,62,15,7,8,"raised")
  40. imgsay(03,41,14,1,-1,""," >>  ")
  41.  
  42. imgiconbox(320,70,633,284,15,7,8,"raised")
  43. imgiconbox(05,261,318,475,15,7,8,"raised")
  44.  
  45. *****
  46. * Define menu arrays
  47. *****
  48. public mvfile[2]
  49. mvfile[1]="Print "
  50. mvfile[2]="End Demo"
  51.  
  52. public mvoptions[1]
  53. mvoptions[1]="Home List"
  54.  
  55. public mvhomelist[property->(reccount())+1]
  56.  
  57. do while .t.
  58.     mvchoice=1
  59.     mvrecno=1
  60.     mvoldrecno=1
  61.     *****
  62.     * Display home exterior & plan
  63.     *****
  64.     imgpcx(alltrim(property->imgview),325,75,"scroll")
  65.     imgpcx(alltrim(property->imgplan),10,266,"scroll")
  66.  
  67.     *****
  68.     * Display home description
  69.     *****
  70.     imgiconbox(05,70,318,259,15,7,8,"etched")
  71.     imgsay(06,09,14,1,-1,"","Description "+property->name)
  72.     mvdescript=property->descript
  73.     mvcount=mlcount(mvdescript,35)
  74.     mvscreen=iif(mvcount<=15,mvcount,15)
  75.     mvline=0
  76.     mvtoprow=6
  77.     do while mvline<=mvscreen
  78.         mvline=mvline+1
  79.         mvtext=memoline(mvdescript,35,mvline)
  80.         imgsay(mvtoprow+mvline,3,14,1,-1,"",mvtext)
  81.     enddo
  82.  
  83.     imgiconbox(320,286,633,475,15,7,8,"etched")
  84.     imgsay(21,53,14,1,-1,"","Specifications")
  85.     imgsay(23,43,14,1,-1,"","    Area: "+alltrim(property->area)+" Sq Feet")
  86.     imgsay(25,43,14,1,-1,"","   Rooms: "+alltrim(property->rooms)+" Bedrooms")
  87.     imgsay(27,43,14,1,-1,"","   Baths: "+property->baths)
  88.     imgsay(29,43,14,1,-1,"","Lot Size: "+alltrim(property->lotsize)+" Sq Feet")
  89.     imgsay(31,43,14,1,-1,"","Township: "+property->township)
  90.  
  91.     do while .t.    
  92.         *****
  93.         * Process mouse event
  94.         *****
  95.         mscrsoron()
  96.         mswait(100)
  97.         mscrsoroff()
  98.         if msinside(09,34,73,62)  
  99.             ***** FILE MENU *****
  100.             imgiconbox(09,34,73,62,15,"",8,"etched")        
  101.             imgiconbox(09,34,73,62,15,"",8,"raised")
  102.             imgsave(09,63,100,116,53,"filemenu")
  103.             mvchoice=imgmenubox(09,63,100,112,"mvfile",14,15,7,0,100)
  104.             mscrsoroff()
  105.             if mvchoice=0
  106.                 imgrestore(09,63,100,116,53,"filemenu",0)
  107.                 mvchoice=1
  108.                 loop
  109.             endif
  110.             if upper(alltrim(mvfile[mvchoice]))="PRINT"
  111.                 imgrestore(09,63,100,116,53,"filemenu",0)
  112.                 *****
  113.                 * Print the screen
  114.                 *****
  115.                 ***** Confirm box *****
  116.                 imgsave(220,140,420,240,10,"relprn")
  117.                 imgiconbox(220,140,420,240,7,15,0,"raised")
  118.                 imgsay(11,29,14,0,-1,""," Printing  screen  to")
  119.                 imgsay(12,29,14,0,-1,""," HP Laserjet on LPT1:")
  120.                 imgiconbox(240,205,304,229,7,8,0,"raised")
  121.                 imgiconbox(336,205,400,229,7,8,0,"raised")
  122.                 imgsay(15,31,14,14,-1,"","  OK  ")
  123.                 imgsay(15,43,14,14,-1,"","CANCEL")
  124.                 mscrsoron()
  125.                 mswait()
  126.                 mscrsoroff()
  127.                 if msinside(336,205,400,229) 
  128.                     *****
  129.                     * Cancel print
  130.                     *****
  131.                     imgiconbox(336,205,400,229,7,"",0,"etched")
  132.                     imgiconbox(336,205,400,229,7,"",0,"raised")
  133.                     imgrestore(220,140,420,240,10,"relprn",0)
  134.                     loop
  135.                 endif
  136.                 if msinside(240,205,304,229) 
  137.                     *****
  138.                     * Print
  139.                     *****
  140.                     imgiconbox(240,205,304,229,7,"",0,"etched")
  141.                     imgiconbox(240,205,304,229,7,"",0,"raised")
  142.                     ***** swap to hplaserjet screen print driver ***** 
  143.                     imgrestore(220,140,420,240,10,"relprn",0)
  144.                     mvswap="hpljprn 300 1 1 6 4"
  145.                     swap(mvswap)
  146.                 endif
  147.             endif
  148.             if upper(alltrim(mvfile[mvchoice]))="END DEMO"
  149.                 imgrestore(09,63,100,116,53,"filemenu",0)
  150.                 return
  151.             endif
  152.         endif
  153.         if msinside(75,34,139,62) 
  154.             ***** OPTIONS MENU *****
  155.             imgiconbox(75,34,139,62,15,"",8,"etched")
  156.             imgiconbox(75,34,139,62,15,"",8,"raised")
  157.             imgsave(75,63,167,105,42,"optmenu")
  158.             mvchoice=imgmenubox(75,63,167,91,"mvoptions",14,15,7,0,100)
  159.             mscrsoroff()
  160.             if mvchoice=0
  161.                 imgrestore(75,63,167,105,42,"optmenu",0)
  162.                 mvchoice=1
  163.                 loop
  164.             endif
  165.             if upper(alltrim(mvoptions[mvchoice]))="HOME LIST"
  166.                 fselect("property")
  167.                 imgrestore(75,63,167,105,42,"optmenu",0)
  168.                 imgsave(100,50,540,270,220,"homelist")
  169.                 mvoldrecno=recno()
  170.                 mv_udfname="dbflist"
  171.                 imglistbox(100,50,540,270,2,1,15,8,8,0) 
  172.                 mscrsoroff()
  173.                 imgrestore(100,50,540,270,220,"homelist",0) 
  174.                 if empty(mvrecno) .or. mvrecno=mvoldrecno
  175.                     jumpto(mvoldrecno)
  176.                     mscrsoron()
  177.                 else
  178.                     exit
  179.                 endif
  180.             endif
  181.         endif
  182.         if msinside(141,34,205,62) 
  183.             ***** HELP MENU *****
  184.             imgiconbox(141,34,205,62,15,"",8,"etched")
  185.             imgiconbox(141,34,205,62,15,"",8,"raised")
  186.             imgsave(320,10,639,470,460,"helpscrn")
  187.             mv_udfname="helplist"
  188.             imglistbox(320,10,639,470,2,1,15,8,8,0) 
  189.             mscrsoroff()
  190.             imgrestore(320,10,639,470,460,"helpscrn",0) 
  191.         endif
  192.         if msinside(250,34,314,62) 
  193.             ***** BACK ARROW *****
  194.             imgiconbox(250,34,314,62,15,"",8,"etched")
  195.             imgiconbox(250,34,314,62,15,"",8,"raised")
  196.             skipto(-1,"property")
  197.             exit
  198.         endif
  199.         if msinside(316,34,380,62) 
  200.             ***** FORWARD ARROW *****
  201.             imgiconbox(316,34,380,62,15,"",8,"etched")
  202.             imgiconbox(316,34,380,62,15,"",8,"raised")
  203.             skipto(1,"property")
  204.             exit
  205.         endif
  206.     enddo
  207. enddo
  208. return
  209.